package com.caoji.auth.Controller;

import com.caoji.auth.service.AliAuthService;
import dto.AliOssSignatureDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description： User: caoji
 * Date: 2020/12/6
 * Time: 19:23
 */
@RestController
@RequestMapping("ali")
public class AuthController {

    @Autowired
    AliAuthService aliAuthService;
    @GetMapping("/oss/signature")
    public ResponseEntity<AliOssSignatureDTO> getSignature(){
        return ResponseEntity.ok(aliAuthService.getSignature());
    }
}
